package gphoto.vo;

import gphoto.bo.Photo;
import gphoto.bo.repertoire.Corbeille;
import gphoto.bo.repertoire.Emplacement;
import gphoto.bo.repertoire.EmplacementATrier;
import gphoto.bo.repertoire.EmplacementTrier;

import java.util.List;

public class AccueilVO {

	private List<EmplacementATrier> emplacementsATrier;
	
	private List<EmplacementTrier> emplacementsTrier;
	
	private Photo photoAleatoire;
	
	private Corbeille corbeille;
	
	public List<EmplacementATrier> getEmplacementsATrier() {
		return emplacementsATrier;
	}

	public void setEmplacementsATrier(List<EmplacementATrier> emplacementsATrier) {
		this.emplacementsATrier = emplacementsATrier;
	}

	public List<EmplacementTrier> getEmplacementsTrier() {
		return emplacementsTrier;
	}

	public void setEmplacementsTrier(List<EmplacementTrier> emplacementsTrier) {
		this.emplacementsTrier = emplacementsTrier;
	}

	public Photo getPhotoAleatoire() {
		return photoAleatoire;
	}

	public void setPhotoAleatoire(Photo photoAleatoire) {
		this.photoAleatoire = photoAleatoire;
	}

	public Corbeille getCorbeille() {
		return corbeille;
	}

	public void setCorbeille(Corbeille corbeille) {
		this.corbeille = corbeille;
	}

	public int getNbPhotosTotalATrier() {
		
		int nbPhotos = 0;
		
		for (int i=0;i<emplacementsATrier.size();i++) {
			Emplacement empl = emplacementsATrier.get(i);
			nbPhotos += empl.getNbPhotos();
		}
		
		return nbPhotos; 
	}

	public int getNbPhotosTotalTrier() {

		int nbPhotos = 0;
		
		for (int i=0;i<emplacementsTrier.size();i++) {
			Emplacement empl = emplacementsTrier.get(i);
			nbPhotos += empl.getNbPhotos();
		}
		
		return nbPhotos; 
	}
}
